In [ ]:
%run "../Utilities/Preparation.ipynb"
In [ ]:
processGFormEN = not ('gformEN' in globals())
if processGFormEN:
# tz='Europe/Berlin' time
dateparseGForm = lambda x: pd.Timestamp(x.split(' GMT')[0], tz='Europe/Berlin').tz_convert('utc')
In [ ]:
if processGFormEN:
csvEncoding = 'utf-8'
gformPath = "../../data/Google forms/"
genericFormName = '-gform-'
csvSuffix = '.csv'
enLanguageID = 'en'
enSuffix = enLanguageID
# dataFilesNamesStem is created in Preparation.ipynb
try:
gformEN = pd.read_csv(\
gformPath + dataFilesNamesStem + genericFormName + enSuffix + csvSuffix,\
dtype=str,\
parse_dates=['Timestamp'],\
date_parser=dateparseGForm,\
)
print("gformEN read_csv success")
except FileNotFoundError:
print("gformEN read_csv failed")
frLanguageID = 'fr'
frSuffix = frLanguageID
frTranslationsPath = gformPath + 'translations-' + frSuffix + csvSuffix
frCorrectScientificAnswersPath = gformPath + 'CorrectScientific-' + frSuffix + csvSuffix
frDemographicAnswersPath = gformPath + 'Demographic-' + frSuffix + csvSuffix
In [ ]:
if processGFormEN:
gformEN['Language'] = pd.Series(enLanguageID, index=gformEN.index)
In [ ]:
if processGFormEN:
# when did the user answer the questionnaire? After playing, before playing, undefined?
answerTemporalities = ['before', 'after', 'undefined'];
gformEN['Temporality'] = pd.Series(answerTemporalities[2], index=gformEN.index)
Labels are made more explicit. Their naming was done automatically by Google forms.
In [ ]:
if processGFormEN:
renamedQuestions = pd.Index([
'Timestamp',
'Are you interested in video games?',
'Do you play video games?',
'How old are you?',
'What is your gender?',
'How long have you studied biology?',
'Are you interested in biology?',
'Before playing Hero.Coli, had you ever heard about synthetic biology?',
'Before playing Hero.Coli, had you ever heard about BioBricks?',
'Have you ever played an older version of Hero.Coli before?',
'Have you played the current version of Hero.Coli?',
'Have you played the arcade cabinet version of Hero.Coli?',
'Have you played the Android version of Hero.Coli?',
'In order to modify the abilities of the bacterium, you have to...',
'What are BioBricks and devices?',
'What is the name of this BioBrick? TER',
'What is the name of this BioBrick? PR',
'What is the name of this BioBrick? CDS',
'What is the name of this BioBrick? RBS',
'What does this BioBrick do? TER',
'What does this BioBrick do? PR',
'What does this BioBrick do? CDS',
'What does this BioBrick do? RBS',
'Pick the case where the BioBricks are well-ordered:',
'When does green fluorescence happen?',
'What happens when you unequip the movement device?',
'What is this? PLASMID',
'What does this device do? PCONS:RBS:GFP:TER',
'What does this device do? PCONS:RBS:FLHDC:TER',
'What does this device do? PCONS:RBS:AMPR:TER',
'What does this device do? PBAD:RBS:GFP:TER',
'What does this device do? PCONS:RBS:GFP:TER 2',
'What does this device do? PCONS:RBS:FLHDC:TER 2',
'What does this device do? PCONS:RBS:AMPR:TER 2',
'What does this device do? PBAD:RBS:GFP:TER 2',
'Guess: what would a device producing l-arabinose do, if it started with a l-arabinose-induced promoter?',
'Guess: the bacterium would glow yellow...',
'What is the species of the bacterium of the game?',
'What is the scientific name of the tails of the bacterium?',
'Find the antibiotic:',
'You can write down remarks here.',
'Do not edit - pre-filled anonymous ID',
'Language',
'Temporality'
])
In [ ]:
if processGFormEN:
gformEN.columns = renamedQuestions
In [ ]:
if processGFormEN:
correctAnswersEN = pd.Series(
[
# Timestamp
[], #1
# Basic demographics questions
[], #2
[], #3
[], #4
[], #5
# Basic biology questions
[], #6
[], #7
[], #8
[], #9
# Your experience with Hero.Coli
[], #10
[], #11
[], #12
[], #13
# General mechanics of the game
["Edit the DNA of the bacterium"], #14
["DNA sequences"], #15
# BioBricks
["Terminator"], #16
["Promoter"], #17
["Coding Sequence"], #18
["RBS"], #19
# BioBrick functions
["It shows the end of the device"], #20
["It controls when the device is active"], #21
["It controls which protein is produced, and thus which ability is affected"], #22
["It controls the level of expression, and thus how much the ability will be affected"], #23
# Devices
["Option 1"], #24
["Under blue light, when the GFP device is equipped"], #25
["Flagella quickly disappear one by one"], #26
# Devices
["A plasmid - it makes it possible to equip an additional device"], #27
# Device symbols
["It generates green fluorescence"], #28
["It makes it possible to move faster"], #29
["It generates antibiotic resistance"], #30
["It generates green fluorescence in presence of l-arabinose"], #31
# Device symbols
["It generates green fluorescence"], #32
["It makes it possible to move faster"], #33
["It generates antibiotic resistance"], #34
["It generates green fluorescence in presence of l-arabinose"], #35
# Beyond the game
["After being induced, it would produce more and"], #36
["If it produces YFP under cyan light",
"If it produced YFP under cyan light"], #37
["E. Coli"], #38
["Flagella"], #39
["Ampicillin"], #40
# Remarks
[], #41
# ID
[], #42
# Language
[], #43
# Temporality
[], #44
], index = gformEN.columns
)
#correctAnswersEN
In [ ]:
if processGFormEN:
interestPositives = ["A lot", "Extremely", "Moderately"]
gameInterestPositives = interestPositives
frequencyPositives = interestPositives
agePositives = [18,19,20,21,22,23]
genderPositives = ["Female"]
biologyStudyPositives = ["Until bachelor's degree", "At least until master's degree"]
biologyInterestPositives = interestPositives
yesNoIdontknowPositives = ["Yes"]
previousPlayPositives = ["Multiple times","A few times","Once","Yes"]
languagePositives = [enLanguageID]
temporalityPositives = [answerTemporalities[1]]
demographicAnswersEN = pd.Series(
[
# Timestamp
[], #1
# Basic demographics questions
interestPositives, #2
frequencyPositives, #3
agePositives, #4
genderPositives, #5
# Basic biology questions
biologyStudyPositives, #6
biologyInterestPositives, #7
yesNoIdontknowPositives, #8
yesNoIdontknowPositives, #9
# Your experience with Hero.Coli
previousPlayPositives, #10
previousPlayPositives, #11
previousPlayPositives, #12
previousPlayPositives, #13
# General mechanics of the game
[], #14
[], #15
# BioBricks
[], #16
[], #17
[], #18
[], #19
# BioBrick functions
[], #20
[], #21
[], #22
[], #23
# Devices
[], #24
[], #25
[], #26
# Devices
[], #27
# Device symbols
[], #28
[], #29
[], #30
[], #31
# Device symbols
[], #32
[], #33
[], #34
[], #35
# Beyond the game
[], #36
[], #37
[], #38
[], #39
[], #40
# Remarks
[], #41
# ID
[], #42
# Language
languagePositives, #43
# Temporality
temporalityPositives, #44
], index = gformEN.columns
)
#demographicAnswersEN
In [ ]:
if processGFormEN:
correctAnswers = correctAnswersEN
In [ ]:
if processGFormEN:
demographicAnswers = demographicAnswersEN
In [ ]:
#correctAnswers.loc[gformEN.columns[19]]
In [ ]:
if processGFormEN:
checkpointQuestionMatching = pd.DataFrame(
{
'checkpoint' : [
# "Timestamp", # 1
'',
# Basic demographics questions
# "Are you interested in video games?", # 2
'',
# "Do you play video games?", # 3
'',
# "How old are you?", # 4
'',
# "What is your gender?", # 5
'',
# Basic biology questions
# "How long have you studied biology?", # 6
'',
# "Are you interested in biology?", # 7
'',
# "Before playing Hero.Coli, had you ever heard about synthetic biology?", # 8
'',
# "Before playing Hero.Coli, had you ever heard about BioBricks?", # 9
'',
# Your experience with Hero.Coli
# "Have you ever played an older version of Hero.Coli before?", # 10
'',
# "Have you played the current version of Hero.Coli?", # 11
'',
# "Have you played the arcade cabinet version of Hero.Coli?", # 12
'',
# "Have you played the Android version of Hero.Coli?", # 13
'',
# General mechanics of the game
# "In order to modify the abilities of the bacterium, you have to...", # 14
'tutorial1.Checkpoint00',
# "What are BioBricks and devices?", # 15
'tutorial1.Checkpoint00',
# BioBricks
# "What is the name of this BioBrick?", # 16
'tutorial1.Checkpoint05',
# "What is the name of this BioBrick?", # 17
'tutorial1.Checkpoint05',
# "What is the name of this BioBrick?", # 18
'tutorial1.Checkpoint02',
# "What is the name of this BioBrick?", # 19
'tutorial1.Checkpoint01',
# BioBrick functions
# "What does this BioBrick do?", # 20
'tutorial1.Checkpoint05',
# "What does this BioBrick do?", # 21
'tutorial1.Checkpoint05',
# "What does this BioBrick do?", # 22
'tutorial1.Checkpoint02',
# "What does this BioBrick do?", # 23
'tutorial1.Checkpoint01',
# Devices
# "Pick the case where the BioBricks are well-ordered:", # 24
'tutorial1.Checkpoint01',
# "When does green fluorescence happen?", # 25
'tutorial1.Checkpoint02',
# "What happens when you unequip the movement device?", # 26
'tutorial1.Checkpoint00',
# Devices
# "What is this?", # 27
'tutorial1.Checkpoint05',
# Device symbols
# "What does this device do?", # 28
'tutorial1.Checkpoint02',
# "What does this device do?", # 29
'tutorial1.Checkpoint02',
# "What does this device do?", # 30
'tutorial1.Checkpoint13',
# "What does this device do?", # 31
'tutorial1.Checkpoint05',
# Device symbols
# "What does this device do?", # 32
'tutorial1.Checkpoint02',
# "What does this device do?", # 33
'tutorial1.Checkpoint02',
# "What does this device do?", # 34
'tutorial1.Checkpoint13',
# "What does this device do?", # 35
'tutorial1.Checkpoint05',
# Beyond the game
# "Guess: what would a device producing l-arabinose do, \
# if it started with a l-arabinose-induced promoter?", # 36
'tutorial1.Checkpoint05',
# "Guess: the bacterium would glow yellow...", # 37
'tutorial1.Checkpoint02',
# "What is the species of the bacterium of the game?", # 38
'tutorial1.Checkpoint00',
# "What is the scientific name of the tails of the bacterium?", # 39
'tutorial1.Checkpoint00',
# "Find the antibiotic:", # 40
'tutorial1.Checkpoint02',
# Remarks
# "You can write down remarks here.", # 41
'',
# Thanks to have filled this study!
# "Do not edit - pre-filled anonymous ID" # 42
'',
# Language
'',
# Temporality
'',
]
}, index = gformEN.columns
)
#checkpointQuestionMatching
In [ ]:
#checkpointQuestionMatching['checkpoint'][20]
In [ ]:
#checkpointQuestionMatching.loc[gformEN.columns[20], 'checkpoint']
In [ ]:
if processGFormEN:
def getUniqueSortedCheckpoints( checkpoints ):
result = checkpoints.unique()
result = result[result!='']
result = pd.Series(result)
result = result.sort_values()
result.index = range(0, len(result))
return result
In [ ]:
if processGFormEN:
validableCheckpoints = getUniqueSortedCheckpoints(checkpointQuestionMatching['checkpoint'])